<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="renderer" content="webkit">
    <meta http-equiv="Cache-Control" content="no-siteapp" />
    <title>在线教育后台管理系统</title>
    <meta name="keywords" content="">
    <meta name="description" content="">
    <!--[if lt IE 9]>
    <meta http-equiv="refresh" content="0;ie.html" />
    <![endif]-->
    <link rel="shortcut icon" href="<?php echo $static; ?>/favicon.png">
    <link href="{$static}/css/bootstrap.min14ed.css?v=3.3.6" rel="stylesheet">
    <link href="{$static}/css/font-awesome.min93e3.css?v=4.4.0" rel="stylesheet">
    <link href="{$static}/css/animate.min.css" rel="stylesheet">
    <link href="{$static}/css/style.min.css" rel="stylesheet">
    <style type="text/css">
        .nav>li>a {
            color: #ffffff;
            /*font-weight: 600;
            padding: 14px 20px 14px 25px;*/
        }
    </style>
</head>
<body class="fixed-sidebar full-height-layout gray-bg" style="overflow:hidden;">
    <div id="wrapper">
        <!--左侧导航开始-->
        <nav class="navbar-default navbar-static-side" role="navigation" style="background: #212121;">
            <div class="nav-close"><i class="fa fa-times-circle"></i>
            </div>
            <div class="sidebar-collapse">
                <ul class="nav" id="side-menu">
                    <li class="nav-header" style="padding-top: 0px;padding-bottom: 0px;height:50px;background:inherit;">
                        <div class="dropdown profile-element top_dropdown_click" style="height: 90%;">
                            <span style="font-size: 35px;color:#fff;padding-top: 7px;" class="fa fa-user"></span>
                            <a data-toggle="dropdown" class="dropdown-toggle" href="javascript:void(0);" style="float: right;width:65%;margin-left: 10%;margin-top: 0px;background: none;height:90%;">
                                <span class="clear">
                                {php}
                                $sesssion_user = session( 'admin.user_auth' );
                                $session_username = $sesssion_user['username'];
                                $session_nickname = mb_substr($sesssion_user['nickname'],0,6,'utf-8');
                                {/php}
                               <!-- <span class="block m-t-xs"><strong class="font-bold" style="font-size: 15px;">{$session_username}</strong></span> -->
                                <span class="text-muted text-xs block" style="font-size: 15px;margin-top: 16px;color: #ffffff;">{$session_nickname}管理员<b class="caret"></b></span>
                                </span>
                            </a>
                            <div style="clear:both;"></div>
                            <ul class="dropdown-menu animated fadeInRight m-t-xs">
                                <!-- <li><a class="J_menuItem" href="{:url('settings/avatar')}">修改头像</a></li> -->
                                <li><a class="J_menuItem top_edit_user_info" href="{:url('Common/userInfo')}">个人资料</a></li>
                                <li class="divider"></li>
                                <li><a href="{:url('login/logout')}">安全退出</a>
                                </li>
                            </ul>
                        </div>
                        <div class="logo-element" style="padding-top: 7px;padding-bottom: 5px;cursor:hand;cursor:pointer;">
                            <span style="font-size: 35px;color:#fff;" class="fa fa-user"></span>
                        </div>
                    </li>
                    <style>
                        .nav>li.active{border-left:1px solid #19aa8d;}
                    </style>
                    <?php $exists = array(); ?>
                    {volist name="all_left_menu" id="menu"}
                    <?php $topKey = $key; ?>
                    {volist name="menu" id="vomenu"}
                        <?php //dump(  $key ); ?>
                         <li style="border-bottom:1px solid #212121;display:none;" class="left_menu_use left_menu_{$topKey}">
                            <?php
                                if( !in_array( $key, $exists ) ) {
                                    $exists[] = $key;
                            ?>
                                <a href="javascript:void(0);" style="font-weight:500;background:#212121;padding-top:10px;padding-bottom:10px;"><i class="{$vomenu[0]['icon']}"></i><span class="nav-label">{$key}</span><span class="fa fa-caret-left first_menu_icon"></span></a>
                            <?php
                                }
                                //不现实首页下的菜单
                                //if( $vomenu[0]['url'] != 'Index/home' ) {
                            ?>
                            <ul class="nav nav-second-level collapse" aria-expanded="false" style="text-align:left;" >
                                    {volist name="vomenu" id="child"}
                                        <li><a class="J_menuItem second_menu_item" style="font-weight:500;background:#333;" href="<?php echo url($child['url']);?>" data-index="{$child.id}"><i class="{$child.icon}"></i>{$child['title']}</a></li>
                                    {/volist}
                            </ul>
                            <?php //} ?>
                        </li>
                    {/volist}
                    {/volist}
                </ul>
            </div>
        </nav>
        <!--左侧导航结束-->
        <!--右侧部分开始-->
        <div id="page-wrapper" class="gray-bg dashbard-1">
            <div class="row border-bottom" style="height:50px;">
                <nav class="navbar navbar-static-top" role="navigation" style="margin-bottom: 0;height:50px;background-color: #212121;">
                    <div class="navbar-header" style="width:calc(100% - 60px);background-color: #212121;">
                        <a class="navbar-minimalize minimalize-styl-2 btn btn-primary " style="width: 30px; text-align: center; padding: 4px 0px; margin-left: 0px;" href="javascript:void(0);"><i class="fa fa-bars"></i> </a>
                        <!-- <form role="search" class="navbar-form-custom" method="post" action="#">
                            <div class="form-group">
                                <input type="text" placeholder="请输入您需要查找的内容 …" class="form-control" name="top-search" id="top-search">
                            </div>
                        </form> -->
                        <ul class="layui-nav top-layui-nav" style="height:50px;margin-left:40px;padding:0;background-color: #212121;">
                            {volist name="top_menu" id="vo" key="i"}
                                <?php
                                    $layui_this = '';
                                    if( $i == 1 ) { 
                                        $layui_this = 'layui-this';
                                    }
                                ?>
                                <li class="layui-nav-item top_menu_nav {$layui_this}" data-spm="{$vo['id']}" style="line-height:50px;"><a href="javascript:void(0);" style="font-size:15px!important;">{$vo.title}</a></li>
                            {/volist}
                            <!-- <li class="layui-nav-item layui-this" style="line-height:50px;"><a href="">产品</a></li>
                            <li class="layui-nav-item" style="line-height:50px;"><a href="">大数据</a></li>
                            <li class="layui-nav-item" style="line-height:50px;"><a href="">社区</a></li> -->
                        </ul>
                    </div>
                    <ul class="navbar-top-links navbar-right" style="width:40px;height:50px;background:#212121; display: block;margin-right: 20px;">
                        
                        <li>
                            <a href="{:url('login/logout')}" class="" title="退出" aria-expanded="false" style="color:#ffffff;font-size: 25px;height:100%;padding:0;line-height: 50px;">
                                <i class="fa fa-power-off"></i>
                            </a>
                        </li>

                    </ul>
                </nav>
            </div>
            <div class="row content-tabs" style="height:32px;line-height:30px;display:none;">
                <!-- <button class="roll-nav roll-left J_tabLeft" style="height:30px;"><i class="fa fa-backward"></i></button> -->
                <button class="roll-nav roll-left J_tabLeft top_admin_refresh" style="height:30px;" title="刷新"><i class="fa fa-refresh"></i></button>
                <nav class="page-tabs J_menuTabs" style="width:auto;height:30px;">
                    <div class="page-tabs-content" style="width:auto;height:30px;">
                        <a href="javascript:;" class="active J_menuTab" data-id="index_v1.html">系统信息</a>
                    </div>
                </nav>
                <!-- <button class="roll-nav roll-right J_tabRight" style="height:30px;"><i class="fa fa-forward"></i></button> -->
                <button class="roll-nav roll-right J_tabRight top_admin_refresh" style="height:30px;" title="刷新"><i class="fa fa-refresh"></i></button>
                <div class="btn-group roll-nav roll-right" style="height: 30px;">
                    <button class="dropdown J_tabClose" style="height: 30px;" data-toggle="dropdown">关闭操作<span class="caret"></span>

                    </button>
                    <ul role="menu" class="dropdown-menu dropdown-menu-right">
                        <!-- <li class="J_tabShowActive"><a>定位当前选项卡</a>
                        </li>
                        <li class="divider"></li> -->
                        <li class="J_tabCloseAll"><a>关闭全部选项卡</a>
                        </li>
                        <li class="divider"></li>
                        <li class="J_tabCloseOther"><a>关闭其他选项卡</a>
                        </li>
                    </ul>                   
                </div>              
                <a href="{:url('login/logout')}" class="roll-nav roll-right J_tabExit" style="height: 30px;"><i class="fa fa fa-sign-out"></i> 退出</a>
            </div>
            <div class="row J_mainContent" id="content-main" style="height:calc(100% - 71px);">
                {block name="iframe"}{/block}
            </div>
            <div class="footer" style="height:10px;">
                <!-- <div class="pull-right">系统管理中心</div> -->
            </div>
        </div>
        <!--右侧部分结束-->
        <!--右侧边栏开始-->
        <div id="right-sidebar">
            <div class="sidebar-container">
                <ul class="nav nav-tabs navs-3">
                    <li class="active"><a data-toggle="tab" href="#tab-1"><i class="fa fa-gear"></i> 主题</a></li>
                    <li class=""><a data-toggle="tab" href="#tab-2">通知</a></li>
                    <li><a data-toggle="tab" href="#tab-3">项目进度</a></li>
                </ul>
                <div class="tab-content">
                    <div id="tab-1" class="tab-pane active">
                        tab1
                    </div>
                    <div id="tab-2" class="tab-pane">
                        tab2
                    </div>
                    <div id="tab-3" class="tab-pane">
                        tab3
                    </div>
                </div>

            </div>
        </div>
        <!--右侧边栏结束-->
    </div>
    <script src="{$static}/js/jquery.min.js?v=2.1.4"></script>
    <script src="{$static}/js/bootstrap.min.js?v=3.3.6"></script>
    <script src="{$static}/js/plugins/metisMenu/jquery.metisMenu.js"></script>
    <script src="{$static}/js/plugins/slimscroll/jquery.slimscroll.min.js"></script>
    <script src="{$static}/js/plugins/layer/layer.min.js"></script>
    <link href="{$static}/js/plugins/layui/css/layui.css" rel="stylesheet">
    <script src="{$static}/js/plugins/layui/layui.js"></script>
    <script src="{$static}/js/hplus.min.js?v=4.1.0"></script>
    <script type="text/javascript" src="{$static}/js/contabs.min.js"></script>
    <script src="{$static}/js/plugins/pace/pace.min.js"></script>

    <script>
        $(document).ready(function() {
            //刷新iframe页面
            $('.top_admin_refresh').click(function() {
                $('.J_iframe').each(function() {
                    if( $(this).is(':visible') ) {
                        var src = $(this).attr( 'src' );
                        $(this).attr( 'src', src );
                        return false;
                    }
                });
            });
        });
    </script>
<style type="text/css">
    .fa-caret-left{
        float: right;
        margin-top: 1px;
        font-size: 20px;
    }
    .fa-caret-down{
        float: right;
        margin-top: 1px;
        font-size: 20px;
    }
</style>
    <script>
        $(document).ready(function() {
            if( $('.top_menu_nav').length > 0 ) {
                $('.top_menu_nav').eq(0).click();
            } else {
                $('.J_iframe').attr( 'src', "{:url('Common/home')}" );
            }
        });

        $("body").bind("keydown",function(event){
            if (event.keyCode == 116) {
                event.preventDefault(); //阻止默认刷新
                var iframeSrc = $(".J_iframe").attr("src");
                $('.J_iframe').attr('src',iframeSrc);

            }
        })

    layui.use('element', function(){
      var element = layui.element; //导航的hover效果、二级菜单等功能，需要依赖element模块
      
      //监听导航点击
      element.on('nav(demo)', function(elem){
        //console.log(elem)
        layer.msg(elem.text());
      });
    });

    $('.left_menu_use').on('click', function() {
        $(this).siblings().find('.first_menu_icon').removeClass('fa-caret-down').addClass('fa-caret-left');
        if( $(this).find('.first_menu_icon').hasClass('fa-caret-left') ) {
            //alert(3);
            $(this).find('.first_menu_icon').removeClass('fa-caret-left');
            $(this).find('.first_menu_icon').addClass('fa-caret-down');
        } else {
            //alert(4);
            $(this).find('.first_menu_icon').removeClass('fa-caret-down');
            $(this).find('.first_menu_icon').addClass('fa-caret-left');
        }
    });

    $('.second_menu_item').on('click', function() {
        $('.second_menu_item').css({'color':'#a7b1c2', 'background':'#333'});;
        $(this).css({'color':'#fff', 'background':'#009688'});
    });

    $(document).ready(function() {
        var firstspm = $('.top-layui-nav li').eq(0).attr( 'data-spm' );
        $('.left_menu_'+firstspm).show();
    });

    $('.top_menu_nav').on('click', function() {
        $('#side-menu li').eq(0).show().siblings().hide();
        var spm = $(this).attr( 'data-spm' );
        $('.left_menu_'+spm).show();
        //alert( spm );
        

        $('.left_menu_'+spm).removeClass('active');
        $('.left_menu_'+spm).find('.nav-second-level').removeClass('in');
        $('.left_menu_'+spm).find('.first_menu_icon').removeClass('fa-caret-down');
        $('.left_menu_'+spm).find('.first_menu_icon').addClass('fa-caret-left');
        
        $('.left_menu_'+spm).eq(0).addClass('active');
        $('.left_menu_'+spm).eq(0).find('ul').addClass('in');

        $('.left_menu_'+spm).eq(0).find('.first_menu_icon').removeClass('fa-caret-left');
        $('.left_menu_'+spm).eq(0).find('.first_menu_icon').addClass('fa-caret-down');

        var href = $('.left_menu_'+spm).eq(0).find('ul li').eq(0).find('a').attr( 'href' );
        $('.second_menu_item').css({'color':'#a7b1c2', 'background':'#333'});
        $('.left_menu_'+spm).eq(0).find('ul li').eq(0).find('a').css({'color':'#fff', 'background':'rgb(0, 150, 136)'});
        $('.J_iframe').attr( 'src', href );
    });

    //修改资料下拉关闭
    $('.top_edit_user_info').click(function() {
        $('.top_dropdown_click').removeClass( 'open' );
    });
    </script>
</body>
</html>